<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>JavaScript 递归方式计算 5 的阶乘</title>
	</head>
	<body>
		<script>
			function x(n){
				if (n===1){
					return 1;
				}else{
					return n*x(n-1);
				}
			}
			console.log(x(5));
		</script>
				
	</body>
</html>
